Optical grating and method of fabricating an optical grating

ABSTRACT

An optical grating includes a sequence of grating lines, the sequence being such that each grating line is centered on a position which is an integer multiple of a line spacing distance from a datum position on the grating, the sequence of grating lines is non-periodic and the sequence of grating lines is formed from N concatenated subsequences. Each subsequence includes a series of one or more instances of a respective grating line pattern. Such an optical grating has a structure that is more amenable to calculation of the grating lines necessary to achieve a desired characteristic. A method of calculating and fabricating such a grating is also disclosed.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to optical gratings.

2. Related Art

An optical grating can be considered to be a sequence of grating lines. The lines modify the reflection and transmission characteristics of an optical transmission medium to which the grating is applied so allowing the characteristics to be tailored, to a greater or lesser degree, to a desired application. For example, an optical grating is used in a distributed feedback laser (DFB) to control the wavelength at which the laser is able to lase. In another application, an optical grating is used to control the transmission characteristics of an optical waveguide, for example an optical fiber.

An article titled "D-Fiber Grating Reflection Filters", P Yennadhiou and S. A. Cassidy, OFC 90 (1990) describes a D-fiber mounted on a flat substrate to expose the optical field in the fiber core. A holographically formed grating was placed on top of the substrate to give a periodic sequence of changes to the effective refractive index seen by the electric field. The changes in refractive index caused by the grating are very small but at each change in index there is a small amount of light reflected back down the fiber. At a certain resonant wavelength these small reflections build up through constructive interference to provide a large reflection whose magnitude is determined by the length of the grating and the size of the refractive index change. For a periodic grating with an arbitrary index profile this resonance occurs where the grating period is an integer multiple of half the wavelength, λ/2, divided by the mean effective index n₀. In the special case when the index profile is a sequence of discrete jumps, the resonance only arises when the period is a odd multiple of λ/(2n₀).

At wavelengths around the exact resonance, the reflection has a characteristics "sin (λ)/λ" wavelength response profile of a finite-sized grating. The width of response peak is roughly inversely proportional to the grating length unless the reflectivity is very high. (see FIGS. 1(a) and 1(b)). When the peak reflectivity is high then multiple reflections become important and the reflection profile no longer narrows with increasing grating length. Instead the response flattens at around 100% reflectivity near the peak with very strong side lobes in the vicinity of the peak (see FIGS. 2(a) and 2(b)).

This characteristic profile is very difficult to change with conventional design methods. In particular, if the periodic change in effective refractive index is fixed by the material properties, then it is not possible to adjust the width of the wavelength response independently of the peak reflection. Nor is it possible by explicit design to remove the side lobe structure of smaller resonances on either side of the peak (although minor errors in the exact periodicity in the grating will often wash these out in practice).

Requirements have emerged which need reflection profiles that differ qualitatively from known prior art gratings. The first is to obtain a reflection profile that is flat over a comparatively large wavelength range (greater than about 1 nm wide) but with no side lobe reflections in the immediate neighborhood of this range. The peak reflection in this case is not important but it needs to be at least 10%. Such an optical grating could be positioned with an optical fiber network so that the connection with a central control could be checked by monitoring the reflections from an interrogation signal sent from the control center. The wavelength of the peak reflection would then be used to label the position of the grating and hence the integrity of the network could be checked at several places. A wide reflection is needed because the wavelength of the interrogation laser could not be accurately specified unless very expensive components were used. The side lobes need to be suppressed to prevent interference between different gratings in the network.

The second requirement is for a high reflection (as close to 100% as possible) in a narrow wavelength region, around 0.1 nm wide, with very low side lobes. This is for use as a wavelength selective mirror for use with a fiber laser to force it to operate in a narrow wavelength region only.

Other applications have been identified for nonconventional gratings where the wavelength response of the transmission and reflection properties could be specified. In particular, distributed Bragg reflectors (DBR) and distributed feedback lasers (DFB) appear to be very good candidates for such gratings.

It is a fairly straightforward matter, in principle, to calculate the effect on light travelling in one dimension of a sequence of steps in the effective index seen by this light. In a weakly guiding fiber waveguide both the electric field E and the magnetic field B are perpendicular to the direction of travel. The reflection and transmission coefficients are determined completely by the relation of E and B after passing through the region of index steps to their values before the region.

If the light passes a distance Δz through a region with a constant effective refractive index β, then ##EQU1## where κ is the effective wavenumber, 2πβ/λ, and ##EQU2## denotes the values of the electric and magnetic fields after a distance Δz. Hence if the light passes a distance Δz through a region of effective index β₁, followed by a distance Δz₂ through a region of effective index β₂ then E and B are given by ##EQU3##

The effect of a sequence of small steps through the regions of differing refractive index can therefore be calculated from a scattering matrix, given by the product of all the small step matrices. Note that the matrix coefficients depend on the wavelength λ. If the final scattering matrix S is given by ##EQU4## then the reflection coefficient is given by |R|² and the transmission coefficient by |T|² where ##EQU5## n_(o) is the refractive index of the substrate and i=(-1)^(1/2).

A 5 mm long grating with a pitch of say 0.25 μm would have 20,000 steps and therefore the calculation for the scattering matrix would involve 20,000 matrix products. If the matrix were to be calculated at say 100 wavelengths in order to resolve the wavelength response of the grating, then the full scattering matrix of the grating would take several million arithmetic operations to calculate. This is therefore not a trivial calculation but one which would pose no difficulty for a reasonably powerful computer.

While the effect of a given sequence of steps in the effective index of the waveguide can easily be calculated, the converse task of designing the sequence to give the required properties to R and T is a different matter entirely. The problem lies in the number of calculations that have to be made. A crude approach of simply enumerating all the different possibilities, and testing each for its suitability, is out of the question: even if the grating pitch was constant and the changes were restricted to allowing a refractive index step or not, then the total number of possibilities would be around 220,000 so no amount of computer power would help.

In order to make any kind of optimization, the grating has to be defined in terms of some tractable number of parameters and repeated calculations made of how the grating properties change with these parameters. This basic idea is known. Simple parameters that have been used are grating pitch which may, for example, vary slowly along the grating's length to form a chirped grating or gratings that miss out some of the steps in a regular or smoothly varying fashion. See for example T Schrans, M Mittelstein and A Yariv "Tunable Active Chirped-Corrugation Waveguide Filters" Applied Physics Letters 55, 212-214 (1989) and D. C. J. Reid and C. M. Ragdale, I. Bennion, D. J. Robins, J. Buus and W. J. Steward "Phase-Shifted Moire Grating Fiber Resonators" Electronic Letters 36, 10-12 (1990), respectively.

These known types of optical gratings are not amenable to approaches of computation that give enough degrees of freedom of device characterization necessary to achieve the sort of wavelength response that are needed for many applications, for example as identified earlier in this application.

SUMMARY OF THE INVENTION

According to a first aspect of the present invention an optical grating including a sequence of grating lines, the sequence being characterized in that:

a) each grating line is centered on a position which is an integer multiple of a line spacing distance from a datum position on the grating;

b) the sequence of grating lines is non-periodic; and

c) the sequence of grating lines is formed from a multiplicity of N concatenated subsequences, each subsequence comprising a series of one or more instances of a respective grating line pattern.

The present invention provides an optical grating having a structure that is more amenable to calculation of the grating lines necessary to achieve a desired effect as will be explained in more detail below. It is preferable that N=2^(M), where M is a whole number, although a grating may comprise two or more such sequences with some decrease in efficiency of calculation.

The number of subsequences can in effect be reduced by incorporating a number of null sections of zero length. For example, in a preferred embodiment of the present invention, if two adjacent subsequences are found during calculation to be formed from the same grating line pattern they are combined into one larger subsequence for future calculation, the number of subsequences being restored by insertion of a null subsequence.

The substrate may be an optical wavelength such as an optical fiber having a D-shaped cross-section. Other substrates may be used as with known optical gratings.

The grating lines may be grooves in the substrate, for example, the grooves having a rectangular cross-section or having triangular cross-sections, for example. The grating lines may be also be defined by refractive index variations in a substrate or other medium.

The grating sequence is formed from a multiplicity of subsequences of the type described above in order to give the flexibility of design while allowing tractable calculation of the optical characteristics of a grating.

The sequence of grating lines is non-periodic so as to allow for non-periodic phase shifts between the grating lines which are necessary to achieve reflection profiles which are qualitatively different to those that can be achieved by conventional gratings. Thus use of a nonperiodic sequence of grating lines gives flexibility in the design process, while use of subsequences ensures that the design process remains tractable as will be explained below.

Such considerations are of utmost importance in a design problem of this size as any optimization method will involve repeated calculations of the total scattering matrix with different parameter values to see which one is the best.

The main consideration in the design algorithm is therefore concerned with providing an efficient method of calculating the total scattering matrix of a grating as efficiently as possible. As will be seen, the structure of grating according to the present invention allows such efficient calculation of the scattering matrix.

The design process of a grating according to the present invention involves determining the values of the parameters of the subsequences, i.e. the grating line pattern and the number of instances of each pattern in a given subsequence, to obtain desired properties in the resultant optical grating. To do this it is necessary to change these parameters one or a few at a time, and compare the new calculated properties of the grating with the old ones to see if there has been any movement towards the desired characteristics.

Because the sequence of grating lines of the optical grating is made up of subsequences as described above it is possible to calculate the total scattering matrix of an optical grating more rapidly than if it was necessary to calculate all the properties of the grating from scratch. Because the grating is split up into a number of sections N, where N is an exact power of 2, N=2^(M), then it can be shown that the effect of change in the grating in one of the sections can be calculated in log₂ (N) matrix multiplies rather than the N multiplies needed in a cruder algorithm which directly calculates the entire new matrix.

According to a second aspect of the present invention a method of fabricating an optical grating comprises the steps of:

calculating the response of an optical grating including a sequence of grating lines, the grating lines being such that:

each grating lines is centered on a position which is an integer multiple of a line spacing distance from a datum position on the grating;

the sequence of grating lines is non-periodic; and

the sequence of grating lines is formed from N concatenated subsequences, each subsequence comprising a series of one or more instances of a respective grating line pattern; and

subsequently repeatedly altering a subsequence of the grating deciding whether to accept the alternation of the subsequence until some predetermined criterion is achieved; and on achieving the predetermined criterion; forming the resultant optical grating sequence on a substrate.

The method preferably includes the additional prior steps of:

selecting a set of grating line patterns; and

calculating the scattering matrix of each member of a set of grating patterns.

The subsequence is preferably altered by either substituting the respective grating line pattern for a different grating line pattern from the set of grating line patterns or changing the number of instances of the grating line pattern in the subsequence. Other operations to change subsequences can be used; the grating line patterns of two subsequences may be interchanged, for example.

The decision whether to accept an alteration to one of the subsequences is preferably determined by an annealing algorithm. In particular an alteration to a subsequence is accepted if the change in a measure of fit of the grating profile to a desired profile is such that exp[-|δv|/T] is less than a random number generated in the range 0 to 1 for some value of T and where V is a predetermined measure of the performance of the grating.

T preferably is monotonically decreased between alterations to the sequence of grating lines.

It should be noted that the grating line patterns may include a null grating pattern of zero length.

In addition to requirements for optical gratings which have reflection profiles that differ qualitatively from known prior art gratings, as discussed above, there have emerged further requirements for gratings whose characteristic profile can be altered in use. For example, there is a requirement in wavelength division multiplexed optical communications systems for both tunable lasers and tunable filters. Such a tunable laser can be achieved in a known manner by providing means for controlling the refractive index of the grating in a DBR or DFB laser. It will be understood that changing the refractive index of a grating means uniformly changing the refractive index across the whole of the grating, or a substantial part thereof, and does not affect the relative index variation which actually constitutes the grating itself i.e. the small steps in refractive index which form the grating lines.

The alteration of the characteristic profile of a grating can be achieved for example, in a grating formed in a semiconductor material, by providing an electrical contact adjacent the grating for injecting current into the grating region so as to alter the refractive index of the material in which the grating is formed. An alternative method of altering the characteristic profile of a grating is to physically alter the structure of the grating or a part thereof by for example employing piezo-electric transducers to stress or stretch the grating.

It has been found that the structure of a grating according to the present invention in addition to being more amenable to calculation of a particular desired fixed characteristic profile, is also more amenable to calculation of a characteristic profile which can be varied in a desired manner during use of the grating.

Thus the present invention also provides a grating in which a plurality of sub-units of the grating, each sub-unit formed from a plurality of subsequences, are separately addressable by means for altering a parameter of each grating sub-unit.

The multiplicity of sub-sequences from which the grating is formed again give flexibility in the design of, in this case, a variable characteristic profile of the grating, while at the same time enabling the calculation of the profile to be tractable.

The design process required for such a grating, having a characteristic profile which can be varied in use, can be regarded as an extension of the design process for a grating having a fixed characteristic profile. The ability to vary a parameter, for example the refractive index, of a plurality of sub-units of the grating gives an extra degree of freedom in the design process so that any optimization of the grating design must effectively be two-dimensional, e.g., the physical structure of the grating sequence comprising the positioning of the grating lines must be optimized in conjunction with the choice of refractive indices for each of the grating sub-units, as will be explained below.

The use of such a design process allows a grating to be designed which has for example four separately addressable sub-units whose refractive index may be varied in use so as to provide a reflection profile which is tunable over a wider range of wavelengths than a conventional periodic grating.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will now be described, by way of example only, with reference to the accompanying drawings in which:

FIGS. 1(a) and 1(b) are graphs of the grating responses of prior art optical gratings having grating lines with a flat-triangle section groove;

FIGS. 2(a) and 2(b) are graphs of the grating responses of prior art optical gratings having high peak reflectivity;

FIG. 3 is a schematic block diagram of an optical grating according to the present invention;

FIG. 4 is a diagram of a set of grating line patterns suitable for optical gratings that are to be etched on an optical fiber waveguide as in FIG. 4(a);

FIG. 5 is a diagram of a grating line patterns suitable for an optical grating for a DFB/DBR laser grating as in FIG. 5(a);

FIG. 6 is a representation of a grating according to the present invention;

FIG. 7 is a key to the representation of the grating shown in FIG. 6 showing the grating line patterns employed;

FIG. 8 is a graph of the theoretical response of the optical grating of FIG. 6;

FIG. 9 is a graph of the measured response of the optical grating of FIG. 6; and

FIG. 10 is a representation of a portion of the grating of FIG. 6 at a transition between two subsequences;

FIG. 11 shows a grating in 4 sub-units, the refractive index n of each sub-unit may be varied by current injected via an electrode;

FIGS. 12(a) and 12(b) are a schematic flow diagram showing the stages f the method of designing a grating having a variable reflection response;

FIG. 13 is a schematic diagram, similar to that shown in FIG. 3, showing the sequence of scattering matrix calculations required when the refractive index of a grating sub-unit is changed; and

FIGS. 14 (a, (b), (c), and (d) show the four theoretical reflection responses from a single grating having four sub-units of variable refractive index.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

FIGS. 1(a), 1(b), 2(a) and 2(b) have already been discussed.

Referring to FIG. 3 an optical grating 2 according to the present invention is shown schematically to show its overall subsequence structure. The grating 2 is a sequence of grating lines formed, in this particular instance, by 8 (=2³) subsequences, 4, 6, 8, 10, 12, 14, 16 and 18. Each of the subsequences is formed from a series of one or more instances of a respective grating line pattern. The particular grating line pattern and the number of instances of it in a particular subsequence will in general vary from one subsequences to another.

FIGS. 4 and 5 show sets of grating line patterns useful for subsequences for an optical fiber grating 40 of FIG. 4(a) and DFB/DBR laser grating 50 of FIG. 5(a) respectively.

A typical set of grating line patterns comprising grooves 34 having a rectangular cross-section used for optical D-fiber grating designs 40 (FIGS. 4(a) ) for fabrication on a silica substrate 34a are shown in FIGS. 4 and 4(a). This is an exemplary set of grating line patterns--other sets could be chosen instead. For a DBR/DFB laser grating as in FIG. 5 which is written on an InP substrate, the fabrication processes force a different type of grating line pattern to be chosen, e.g. triangular cross-section grooves 36. On these substrates 36a it is very difficult to cut vertical walls, so discreet steps in the refractive index profile cannot be easily achieved. The typical groove has a triangular cross-section, in this case with etch angles of around 55°, an exemplary set being shown in FIG. 5.

Referring once again to FIG. 3, the optical effect of the subsequences 4 to 18 of the grating is calculated as follows. The scattering matrix for each grating line pattern is calculated beforehand in a known manner as described earlier. The scattering matrix for a given subsequence 4, 6, 8, 10, 12, 14, 16 and 18 can then be calculated by raising the appropriate grating line pattern scattering matrix to a power equal to the number of instances of that pattern in a subsequence. This is carried out for all the subsequences 4 to 18 of the grating line sequence.

The scattering matrices for consecutive pairs of the subsequences are then calculated by forming the product of the scattering matrices of the subsequences. These products form the second level scattering matrices 20, 22, 24 and 26 of the grating.

In a similar fashion the level 2 scattering matrices are paired and the level 1 scattering matrices 28 and 30 are calculated. The two, level 1 scattering matrices 28 and 30 are finally combined to form the full, level 0 scattering matrix 32.

If one of the level 3 subsequences is changed during application of an optimization algorithm, for example subsequence 12, then to calculate the new full grating scattering matrix one calculates the matrix product of subsequences 12 and 14 to form a new level 2 matrix, 24, which is then multiplied with the existing level 2 matrix, 26, to form a new level 1 matrix number 30. This finally is multiplied with the other existing level 1 matrix 28 to form the full scattering matrix 32 for this new sequence of grating lines.

Referring now to FIG. 6, there is shown a particular optical grating calculated according to the method of the present invention comprising ten grating line patterns as shown by the key at FIG. 7 and the theoretical response is shown in FIG. 6.

The basic pitch of the grating line patterns of FIG. 7 are about 0.5 μm with a single smallest feature (one line) of about 0.25 μm. The word patterns consist of 4 bits, each word being about 1 μm long. The total length of the grating of FIG. 6 is about 4 mm with 64 subsequences including any null subsequences that may have introduced when adjacent subsequences of the same grating line pattern were combined. The patterns were etched into a silica substrate to a depth of about 0.25 μm.

FIG. 9 is a graph of the experimentally measured reflection characteristics of the optical grating of FIG. 6 after applying the optical fiber waveguide to the surface of a D-fiber optical fiber waveguide.

The structure of the grating according to the present invention allows efficient calculation of changes to the scattering matrix and so allows efficient implementation of optimization algorithms. The optimization algorithm used in the present instance will now be described, by way of example.

The first step was to choose the shape of the desired reflection characteristics of the grating as a function of wavelength, R_(T) (λ) and compare the actual reflection R_(A) (λ) obtained from the grating with the desired one. The measure of the difference between the two was defined as ##EQU6## α is, in effect, a measure of the scale of the reflection and β a measure of the fit to the desired shape. The aim was to minimize β and maximize α. Depending on the particular situation, a global measure v can be formed from a weighted difference of the two numbers to give the parameter to be optimized i.e. setting v=(1-w). α-w. β, where w is a weighting parameter between 0 and 1. A larger value of w means that more weight is being attached to the shape of the refraction profile at the possible expense of the total reflectivity.

We then sought to maximize v and used a version of a simulated annealing algorithm to determine the grating line sequence which led to a suitable maximum. In this algorithm a change has made to the grating either by changing one of the work patterns or changing the length or interchanging two of the subsequences. These changes were done sequentially to randomly chosen subsequences, one subsequence being changed or two interchanged before recalculating the response of the grating. Other more complicated changes may be made but at the expense of increased calculation. To simplify the scheme of this embodiment the interchange step may be eliminated.

Using this algorithm we then calculated the change δv in the measure of the grating performance caused by the grating alteration. If δv increased, i.e. the new grating was "better" than the old one, then the change to the grating was accepted. If δv was decreased by the alteration to the subsequences, then the change was only accepted if exp[-|δv|/T] was less than a random number generated in the interval 0 to 1, where T was a parameter that represents a fictitious temperature.

If T was high, then nearly all the changes were accepted and v wanders around almost randomly. As T was decreased then the chances of accepting a change that decreased v gradually reduced and v was forced into a maximum.

Such a maximum is very probably a local maximum so there will in general be expected to be many solutions that result in the value of v very close to the best one obtained.

The strategy usually adopted, as here, was to make several independent calculations using different random seeds, and then pick the best grating line sequence that resulted. The measure of the value of a particular grating was to some extent arbitrary and other measures of fitness of fit of grating could be used. In particular, if one is interested in the dispersion properties of a grating then one would use the full complex form of the target response R_(T) (λ) and the actual reflection R_(A) (λ) and the definitions of α and β rather than their moduli.

The calculated grating sequence was then used to fabricate a grating by forming the grating lines as a sequence of vertically walled, etched steps by electron-beam lithography directly onto a silica substrate. The experimentally measured response of the grating of FIG. 6 is shown at FIG. 9.

FIG. 10 shows a portion of the grating of FIG. 6 at a transition between two subsequences 38 and 40.

The method of fabricating an optical grating according to the present invention has been described in terms of a grating line sequence which is made up of a whole number power of 2 subsequence. This structure obtains the full benefit of the present invention. However, it is also possible to obtain the principle benefit of the invention if a grating sequence comprises a small number of concatenated sequences each sequence being as described above. In such a case there will be a small overhead in the calculation as two level 0 scattering matrices will need to be multiplied together. Thus a grating comprising a number of grating sequences each having 2^(M) subsequence according to the present invention in series can be calculated with slightly less efficiency than a grating having an exact power of two subsequence.

FIG. 11 shows a grating whose characteristic profile can be altered in use. The grating is divided into four sub-units 41, 42, 43, 44, each of which is separately addressable through an electrode. Thus the refractive index of each of these sub-units can be controlled between two values which are given, in a known manner, by the properties of the semiconductor material used, by applying a voltage to each of the electrodes. The reflection profile of the grating can be switched between a number of different responses by applying different sets of voltages of the sub-units 41-44. In FIG. 11, `n` is the effective refractive index of the sub-units, each of which is addressed through separate electrodes 41a, 42a, 43a and 44a.

The design process for this grating must therefore specify a grating sequence, formed from sub-sequences of grating line patterns, and must also specify the particular refractive indices for each of the sub-units required to achieve switching between the desired characteristic response.

Thus if four particular responses A, B, C, D are required from the grating then the design process must optimize both the grating sequence and the four sets of refractive indices n₁, n₂, n₃, n₄ required to achieve these four responses, so that the grating characteristic is

A when {n₁, n₂, n₃, n₄ } is {a₁, a₂, a₃, a₄ }

B when {n₁, n₂, n₃, n₄ } is {b₁, b₂, b₃, b₄ }

C when {n₁, n₂, n₃, n₄ } is {c₁, c₂, c₃, c₄ }

D when {n₁, n₂, n₃, n₄ } is {d₁, d₂, d₃, d₄ }

It should be noted that the grating line sequence remains fixed in each case, the only thing that changes is the sequence of refractive indices. This sequence can be changed by applying different voltages through the independent electrodes.

The design method for a grating having a variable reflection characteristic thus differs from that for a grating having a fixed reflection characteristic in a number of respects. Firstly there is always a choice during the calculation of the design process of whether to change a grating subsequence (as for the fixed response grating) or to change the refractive index of a sub-unit of the grating, this is shown schematically in the flow diagram of FIG. 12. If the choice to change a grating subsequence is made then the scattering matrices are recalculated in the same manner as for the fixed response grating as described above. If the choice is to change the refractive index of a grating sub-unit then the recalculation is different as will be described below.

Secondly, a further difference for the variable response grating design method is that a set of scattering matrices corresponding to each of the different sequences (n₁ -₄) of refractive index for the grating sub-units must be calculated. Thus if four different reflection responses are required from the grating, four sets of scattering matrices required to give the four different reflection coefficients as a function of wavelength, must be calculated.

Thirdly a different measure of fit between the calculated matrices and the target response is required, since the target response is in fact a number of responses, each corresponding to one of the sequences of refractive indices of the grating sub-units.

Referring to FIGS. 12(a) and 12(b) each of the stages of the design method will now be described in more detail, for a grating having a sub-units which is required to give R different reflection characteristics.

The initialization stage comprises:

initializing the grating line patters and R-refractive index sequence in the s sub-units (These could either be random sequences or values read in from a previous calculation) and;

pre-calculating the scattering matrices for each of the grating line patterns at each of the allowed values of refractive indices.

The selection stage 46 comprises choosing at random a grating subsequence or a refractive index sub-unit in one of the switchable sequences (typically with the subsequence being slightly more likely to be chosen). Cycling the subsequence or index value through all the possible choices, until either a change is accepted or all the possibilities are exhausted, and then choosing another subsequence or index sub-unit to change.

If a grating subsequence is chosen to be changed then the recalculation stage 47 is the same as for the fixed response grating design method, i.e. only those matrices in the structure shown in FIG. 3 which are affected by the change are recalculated. However as mentioned above, the matrices need to be calculated N-times i.e. once for each of the N-target wavelength responses--corresponding to the N-switchable refractive index sequences of R-refractive index sections.

If a sub-unit refractive index is chosen to be changed then the recalculating stage 48 must take account of the change in index affecting all the levels in FIG. 3 below the level at which the index is changed. This is shown in FIG. 13.

A change to the refractive index value of the sub-unit labelled 1 in level 2 of FIG. 13 means that it is necessary to replace all of the scattering matrices affected at level 5 (numbers 8-15). Following this it is necessary to

recalculate the matrices (4-7) at level (4) by pairwise multiplication in level (5),

recalculate the matrices (2 & 3) at level (3) by pairwise multiplication in level (4),

recalculate the matrix 1 at level 2 by multiplication of matrices 2 & 3 in level (3),

Multiply the old matrix 0 with the new matrix 1 to give a new matrix 0 at level (1).

Multiply the new matrix 0 with the old matrix 1 to give the new scattering matrix.

Thus 4+2+1+2=9=((32/4-1) - log₂ (4) matrix operations are needed to update the scattering matrix as opposed to 31 with a more conventional algorithm.

In contrast to the calculation for a grating subsequence change, these matrices need only to be calculated once--as, in a refractive index change only one section (out of he R available) in one refractive index sequence (of the N-available) is change at a time. The remaining matrices corresponding to the (N-1) sequences that were not changed at this point, are unaltered.

Having made a change, either of grating subsequence or of sub-unit index the next stage 48 is to decide whether to accept this change. This will depend on whether the change gives a better fit to the N-desired or target responses, hence the measure of difference used previously for the fixed grating response design method is modified to account for the R different refractive index sequences for the s sub-units of the grating. Thus ##EQU7## the extra suffix, "i'" denotes the coefficients corresponding to the i'th refractive index sequence.

The final measure of fit is formed from these two quanities: V=(1-w), a-w. β where w is a weighting parameter.

V is then used in an optimization or annealing algorithm in precisely the same way as previously described in order to decide whether to accept the change (in grating subsequence or sub-unit index) or not.

If the change is accepted the current grating sequence and refractive index sequences are saved and the iteration is repeated by again choosing a grating sub-sequence or sub-unit index to change. Once a certain number of iterations or a predetermined measure of fit has been reached the design process is stopped.

The result of the design process is one sequence of grating lines and R sequences of refractive indices for the s sub-units.

FIGS. 14(a), (b) and (c), (d) show the four different theoretical reflection responses of a grating having s=4 (and T=4). Each response corresponds to a particular sequence of refractive index values for the grating sub-units. It can be seen that the reflection responses are separated by 4 nm giving a total tuning range of 12 nm. Fine tuning to give a reflection response intermediate between any of the four shown is achieved by altering the refractive index of all four sub-units uniformly, while tuning between each of the responses shown is achieved by switching from one of the sub-unit refractive index sequences determined by the design method to another such sequence.

If the maximum index change utilized in the design of the grating of FIGS. 14(a)-(d) were applied to a conventional grating a tuning range of only 3-4 nm would result, thus the design achieves a significantly larger tuning range.

Although the design method for a grating having a variable reflection response has been described for gratings in which the response is changed by a change of refractive index, it will be apparent to the skilled man, that, in the method, refractive index can be replaced by any other parameter which will affect the reflection response of the grating, for example the local stressing or stretching of a sub-unit of the grating. 

We claim:
 1. An optical grating including a sequence of grating lines, the sequence being characterized in that:a) the position of each grating line in said sequence is centered at an integer multiple of a predetermined line spacing distance from a fixed point; b) said sequence of grating lines being non-periodic; and c) the sequence of grating lines being formed from a multiplicity of N concatenated subsequences of grating lines, each subsequence comprising a series of one or more instances of a predetermined pattern of grating lines; in which N=2^(M), where M is a whole number.
 2. An optical grating including a sequence of grating lines, the sequence being characterized in that:a) the position of each grating line in said sequence is centered at an integer multiple of a predetermined line spacing distance from a fixed point; b) said sequence of grating lines being non-periodic; and c) the sequence of grating lines being formed from a multiplicity of N concatenated subsequences of grating line, each subsequence comprising a series of one or more instances of a predetermined pattern of grating lines; in which N=p. 2^(M), where p is a prime number and M is a whole number.
 3. A method of fabricating an optical grating, said method comprising the steps of:c) calculating a grating response of a grating comprising an optical grating including a sequence of grating lines, the grating being such that: the position of each grating line is centered at an integer multiple of a predetermined line spacing distance from a fixed point; the sequence of grating lines being non-periodic and being formed from N concatenated subsequences, each subsequence comprising a series of one or more instances of a respective grating line pattern; and (d) subsequence repeatedly altering a subsequence of the grating whose response is being calculated and determining whether to accept the alteration of the subsequence until a predetermined criterion is achieved; and e) forming the resultant optical grating sequence on a substrate; in which the decision whether to accept an alteration to one of the subsequences is determined by an annealing algorithm.
 4. An optical grating including a sequence of grating lines, wherein the separation of any two adjacent lines of the sequence is an integer multiple of the smallest separation between adjacent lines occurring in the sequence and the separation of adjacent lines varies irregularly along the grating.
 5. A grating as in claim 4 in which the lines are defined by refractive index variations in a substrate.
 6. A grating as in claim 5 in which the substrate is an optical waveguide.
 7. A grating as in claim 6 in which the optical waveguide is an optical fiber having a D-shaped cross-section.
 8. A grating as in claim 7 which the grating lines are walls of grooves in a substrate.
 9. A grating as in claim 8 in which the grooves have a rectangular cross-section.
 10. A grating as in claim 8 in which the grooves have triangular cross-sections.
 11. A grating as claimed in claim 4, including control elements arranged for separately varying a parameter of discrete portions of the grating.
 12. A grating as in claim 11 in which said parameter is refractive index.
 13. A grating as claimed in claim 12 in which the control elements comprise electrodes.
 14. A grating as claimed in claim 11 in which said parameter is physical length.
 15. A laser including a distributed feedback element which comprises an optical grating including a sequence of grating lines, wherein the separation of any two adjacent lines of the sequence is an integer multiple of the smallest separation between adjacent lines occurring in the sequence and the separation of adjacent lines varies irregularly along the grating.
 16. A laser as claimed in claim 15 in which the lines are defined by refractive index variations in a substrate.
 17. A laser as claimed in claim 16 in which the substrate is an optical waveguide.
 18. A laser as claimed in claim 17 in which the optical waveguide is an optical fiber having a D-shaped cross-section.
 19. A laser as claimed in claim 16 in which the grating lines are walls of grooves in a substrate.
 20. A laser as claimed in claim 19 in which the grooves have a rectangular cross-section.
 21. A laser as claimed in claim 19 in which the grooves have triangular cross-sections.
 22. A laser as claimed in claim 15, including control elements arranged for separately varying a parameter of discrete portions of the grating.
 23. A laser as claimed in claim 22 in which said parameter is refractive index.
 24. A laser as claimed in claim 23 in which the control elements comprise electrodes.
 25. A laser as claimed in claim 22 in which said parameter is physical length.
 26. A laser as claimed in claim 15, including a semiconductor laser active structure. 